package com.yy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;


import com.yy.mapper.CmsMessageDao;
import com.yy.model.CmsMessageEntity;
import com.yy.service.CmsMessageService;


/**
 * 在线留言
 * 
 * @author yy
 * @email 
 * @date 2017-07-26 16:26:46
 */
@Service("cmsMessageService")
public class CmsMessageServiceImpl implements CmsMessageService {
	@Autowired
	private CmsMessageDao cmsMessageDao;
	
	@Override
	public CmsMessageEntity queryObject(Long id){
		return cmsMessageDao.queryObject(id);
	}
	
	@Override
	public List<CmsMessageEntity> queryList(Map<String, Object> map){
		return cmsMessageDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return cmsMessageDao.queryTotal(map);
	}
	
	@Override
	public void save(CmsMessageEntity cmsMessage){
		cmsMessage.setCreateTime(new Date());
		cmsMessageDao.save(cmsMessage);
	}
	
	@Override
	public void update(CmsMessageEntity cmsMessage){
		cmsMessage.setCreateTime(new Date());
		cmsMessageDao.update(cmsMessage);
	}
	
	@Override
	public void delete(Long id){
		cmsMessageDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		cmsMessageDao.deleteBatch(ids);
	}
	
}
